import type { DescriptionsProps } from 'antd';
import { Descriptions } from 'antd';
import React from 'react';

const labels = [
  "来源案件",
  "来源人员",
  "对象姓名",
  "身高",
  "年龄",
  "昵称",
  "性别",
  "职业",
  "证件类型",
  "证书编号",
  "人员编号",
  "户籍信息",
  "居住地",
  "联系方式",
  "线索时间",
  "线索区划",
  "线索地址",
  "涉罪类型",
  "案情描述",
  "物件类型",
  "物件名称",
  "物件备注",
  "对象名称",
  "证件编号",
  "关系类型"
];

const items: DescriptionsProps['items'] = labels.map((label) => {
  return {
    key: label.toLowerCase().replace(/\s/g, '_'), // 将label转换为小写并用下划线代替空格
    label: label,
    children: '',
  };
});

const App: React.FC = () => <Descriptions column={2} items={items} />;

export default App;
